/**
 * @description 出卡啦市集
 */
import React from 'react';
import loadable from "commons/loadable";
import EntryBase from "../Common/EntryBase";
import RouterNotMatch from "components/RouterNotMatch";
import { HashRouter, Route, Switch } from 'react-router-dom';
import wxShare from "commons/wxShare";

class App extends EntryBase {
    constructor(props) {
        super(props);
        this.state = {}
    }
    componentDidMount() {
        super.componentDidMount();
        // 设置分享到商品
        let shareData = {};
        shareData.title = `不点开看看，你都不知道自己损失了多少优惠`;
        shareData.desc = "嘿嘿我已经偷偷省了好多钱";
        wxShare(shareData);
    }
    render() {
        return (
            <HashRouter>
                <Switch>
                    {/* <Route path="/Recommend" component={loadable(() => import("./Recommend"))} /> */}
                    <Route path="/Collection" component={loadable(() => import("./Collection"))} />
                    <Route path="/ArticleDetail/:articleId" component={loadable(() => import("./ArticleDetail"))} />
                    <Route path="*" component={RouterNotMatch} />
                </Switch>
            </HashRouter >
        )
    }
}

export default App;